<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>BendTech Directory Index</title>

    <?php include_once('PP.php'); ?>
    <?php include_once('PPEntry.php'); ?>
  </head>

  <body id="pp_index">
    <?php include_once('bendtech-header.php') ?>
    <p>
    Want to be part of the directory?  <a href="edit.php">Add an entry</a>!
    </p>
    <p class="clear">
    Curious about who's in your area? Take a look at the 
    <a href="<?= PP::getUrl('map') ?>">Directory Map</a>!
    </p>
    <ul id="entry_list">
    <?php
    $entries = PPEntry::get_entries(NULL, 'name, company');
    $even = true;
    foreach ($entries as $entry) {
      $even = !$even;
      $h = $entry->htmlFields();
      ?>
      <a class="entry_item <?= $val = $even ? 'even' : 'odd'; ?>" href="<?= $entry->getUrl('view') ?>">
        <?= $entry->getImage('thumb') ?>
        <span class="display_name"><?= $h['name_company'] ?></span>
        <span class="summary"><?= $h['summary'] ?></span>
        <span class="clear"></span>
      </a>
    <?php } ?>
    </ul>
    <?php include_once('bendtech-footer.php') ?>
  </body>
</html>
<?php pp::disconnect() ?>
